package com.avecsys.quotemanager.utils;

import java.util.ArrayList;
import java.util.List;

import javax.faces.model.SelectItem;

import com.avecsys.quotemanager.pojos.CountryMasterPojo;

public class SelectItemUtils {

	public static List<SelectItem> convertCountryToSelectItems(
			List<CountryMasterPojo> countryMasterPojoList) {
		List<SelectItem> selectItemList = new ArrayList<SelectItem>();

		for (CountryMasterPojo countryMasterPojo : countryMasterPojoList) {
			SelectItem selectItem = new SelectItem(countryMasterPojo.getCode(),
					countryMasterPojo.getLongDesc());
			selectItemList.add(selectItem);
		}
		return selectItemList;
	}

}
